﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Data;
using System.Data.Common;


namespace Nova_DAL
{
    public class TLaneDefine
    {
        string strSQL = "";
        DataSet ds = null;
        DbHelper dbHelper = new DbHelper();
        DbCommand cmd = null;

        ///<summary>
        ///获取巷道表信息
        ///</summary>
        ///<param name="sQL">SQL</param>
        ///<returns>返回DataSet</returnss>
        ///Writer：[王成友]
        ///Create Date： [2010-6-30]
        ///</summary>
        public DataSet DataSetTLaneDefine()
        {
            try
            {
                strSQL = "select No_Lane,'第'+convert(varchar(50),No_Lane)+'巷道' as No_Lane_Text from TLaneDefine order by No_Lane";
                cmd = dbHelper.GetSqlStringCommond(strSQL);
                ds = dbHelper.ExecuteDataSet(cmd);
            }
            catch (Exception ex)
            {
                Console.Write(ex.ToString());
            }
            return ds;
        }

        /// <summary>
        /// 金锋馥项目专用  除去动态尺寸巷道3#
        /// </summary>
        /// <returns></returns>
        public DataSet DataSetTLaneDefineNoDynamicsSizeLane()
        {
            try
            {
                strSQL = "select No_Lane,'第'+convert(varchar(50),No_Lane)+'巷道' as No_Lane_Text from TLaneDefine where No_Lane<>3  order by No_Lane";
                cmd = dbHelper.GetSqlStringCommond(strSQL);
                ds = dbHelper.ExecuteDataSet(cmd);
            }
            catch (Exception ex)
            {
                Console.Write(ex.ToString());
            }
            return ds;
        }
    }
}
